Skip to main content

Freeze an account

POST: /api/v1/Accounts/freeze

Description

This endpoint allows you to freeze or unfreeze an account based on a request.

Request

  • Path parameter:

    • version: API version (string)
  • Headers:

    • Accept-Language: Change default response message language from English(en). Available languages fr,en
  • Request body:

    • FreezeOrUnFreezeRequest: Represents the request to freeze or unfreeze an account (object)

Responses

  • 200: Success. Returns a StringResponse.

  • 400: Bad Request. The request is not valid.

Examples

Request
httpCopy codePOST /api/v{version}/Accounts/freeze HTTP/1.1
Host: example.com
Accept-Language: en
Content-Type: application/json
{
"accountId": "1234",
"freezeReason": "LostCard"
}

Response
httpCopy codeHTTP/1.1 200 OK
{
"message": "Account frozen successfully."
}

Error Response
httpCopy codeHTTP/1.1 400 Bad Request
{
"message": "Invalid account ID."
}

/api/v1/Accounts/freeze

Headers

Content-TypeValue
Accept-Language

Headers

Content-TypeValue
Content-Typeapplication/json

Headers

Content-TypeValue
Accepttext/plain

Body (raw)

{
"accountId": `<string>`
}

Response: 200

{
"succeeded": `<boolean>`,
"message": `<string>`,
"errors": [
`<string>`,
`<string>`
],
"data": `<string>`
}

Response: 400

{
"succeeded": `<boolean>`,
"message": `<string>`,
"errors": [
`<string>`,
`<string>`
],
"data": `<string>`
}